New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up inflation swaps convention #1539
Conversation
USCPI now interpolated JPY now interpolated (using 10th of the month inflation) All GBP indices now use 2 month inflation lag. Primary Source: http://www.trade2win.com/boards/attachments/next-steps/101520d1296424640-inflation-trading-barclays-inflation-derivatives-users-guide.pdf
* @param businessDayAdjustment the business day | ||
* @return the convention | ||
*/ | ||
public static InflationRateSwapLegConvention of( | ||
PriceIndex index, | ||
Period lag, | ||
PriceIndexCalculationMethod priceIndexCalculationMethod, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an incompatible change. Need to add an overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Have deprecated the old method as the client should have to provide interpolation style when defining conventions. Defaulting to monthly seems slightly arbitrary.
BusinessDayAdjustment businessDayAdjustment) { | ||
|
||
return new InflationRateSwapLegConvention(index, lag, PriceIndexCalculationMethod.MONTHLY, false, | ||
return new InflationRateSwapLegConvention(index, lag, priceIndexCalculationMethod, false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each argument should be on a new line
@@ -157,6 +194,7 @@ private static FixedRateSwapLegConvention fixedLegZcConvention(Currency ccy, Hol | |||
} | |||
|
|||
//------------------------------------------------------------------------- | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No blank line here
private static final InflationRateSwapLegConvention INFL3 = InflationRateSwapLegConvention.of(GB_RPIX, LAG_3M, BDA_MOD_FOLLOW); | ||
private static final InflationRateSwapLegConvention INFL = InflationRateSwapLegConvention.of(GB_HICP, LAG_3M, MONTHLY, BDA_MOD_FOLLOW); | ||
private static final InflationRateSwapLegConvention INFL2 = InflationRateSwapLegConvention.of(GB_RPI, LAG_3M, MONTHLY, BDA_MOD_FOLLOW); | ||
private static final InflationRateSwapLegConvention INFL3 = InflationRateSwapLegConvention.of(GB_RPIX, LAG_3M, MONTHLY, BDA_MOD_FOLLOW); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could back this out when compatibility overload added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would rather keep the test changes in order to discourage the use of the now deprecated method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved subject to fixing the build failure. (The class was incorrectly reformatted, with lots of extra blank lines)
* Cleaning up inflation swaps convention: USCPI now interpolated JPY now interpolated (using 10th of the month inflation) All GBP indices now use 2 month inflation lag. Primary Source: http://www.trade2win.com/boards/attachments/next-steps/101520d1296424640-inflation-trading-barclays-inflation-derivatives-users-guide.pdf
Primary Source: Barclays Inflation Derivatives Users Guide
“The trading month for UK RPI breakeven swaps has a lag of two months“
“US zero coupon CPI swaps have adopted an interpolated base index format“
“…with the most standard format for [JPY] zero coupon breakevens using the same interpolated inflation basis as JGBi bonds, ie, a three-month lagged inflation reference from the tenth of the month. “